export default function getData () {
  return {
    color: ['#127bff','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
    // itemStyle: {
    //   // 点的颜色。
    //   color: '#127bff'
    // },
    legend: {},
    tooltip: {},
    dataset: {
      // Provide data.
      source: [
        ['Product', '2015', '2016', '2017'],
        ['Matcha Latte', ...randomize()],
        ['Milk Tea', ...randomize()],
        ['Cheese Cocoa', ...randomize()],
        ['Walnut Brownie', ...randomize()]
      ]
    },
    // Declare X axis, which is a category axis, mapping
    // to the first column by default.
    xAxis: { type: 'category' },
    // Declare Y axis, which is a value axis.
    yAxis: {},
    // Declare several series, each of them mapped to a
    // column of the dataset by default.
    series: [
      { type: 'bar' }, 
      { type: 'bar' }, 
      { type: 'bar' },
      {
        type: 'line',
        smooth: true
      }
    ],
  }
}

function randomize () {
  return [0, 0, 0].map( () => {
    return Math.round(300 + Math.random() * 700) / 10
  })
}
